def object2hash(dom_element):
    attributes = {}
    
    for key in dom_element.attributes.keys():
        attributes[key] = dom_element.attributes[key].value
        
    return attributes